package com.pubinfo.passbook.common.model.ruler;

import lombok.Data;
import org.dom4j.Element;

@Data
public class Details {
  /*项目代码*/
  private String auxItemRelatedCode;
  /*项目名称*/
  private String auxItemRelatedName;
  /*项目数量*/
  private String quantity = "0";
  /*项目合计金额*/
  private String amount = "0";
  /*自费金额*/
  private String amountSelf = "0";
  /*金额百分比*/
  private String amountPercent;
  
  public Details() {
  }
  
  public Details(Element elm) {
    this.auxItemRelatedCode = elm.element("AuxItemRelatedCode").getText();
    this.auxItemRelatedName = elm.element("AuxItemRelatedName").getText();
    if (elm.element("AuxItemQuantity") != null) {
      this.quantity = elm.element("AuxItemQuantity").getText();
    }
    if (elm.element("AuxItemAmount") != null) {
      this.amount = elm.element("AuxItemAmount").getText();
    }
    if (elm.element("AuxItemAmountSelf") != null) {
      this.amountSelf = elm.element("AuxItemAmountSelf").getText();
    }
    if (elm.element("AuxItemAmountPercent") != null) {
      this.amountPercent = elm.element("AuxItemAmountPercent").getText();
    }

  }
}
